import { EntityObject } from 'tiny-entity';
var webconfig = require("../../webconfig").webconfig;

export class EntityObjectFactory {
    static GetEntityObjectType() {
        if (webconfig.dbType == "nedb") {
            let a: typeof EntityObject = require("tiny-entity/nedb").EntityObjectNeDB;
            return a;
        }
        else if (webconfig.dbType == "mysql") {
            let entityObjectMysql: typeof EntityObject = require("tiny-entity/mysql").EntityObjectMysql;
            return entityObjectMysql;
        }
        else if (webconfig.dbType == "sqlite") {
            let entityObjectSqlite: typeof EntityObject = require("tiny-entity/sqlite").EntityObjectSqlite;
            return entityObjectSqlite;
        }
    }
}
